A Modular Monadic Action Semantics
نویسندگان
چکیده
A domain-specific language (DSL) is a framework which is designed to precisely meet the needs of a particular application. Domain-specific languages exist for a variety of reasons. As productivity tools, they are used to make application prototyping and development faster and more robust in the presence of evolving requirements. Furthermore, by bridging the “semantic gap” between an application domain and program code, DSLs increase the opportunity to apply formal methods in proving properties of an application. In this paper, we contribute a synthesis of two existing systems that address the problem of providing sound semantic descriptions of realistic programming languages: action semantics and modular monadic semantics. The resulting synthesis, modular monadic action semantics, is compatible with action semantics yet adds true modularity and allows domain specific specifications to be made at a variety of levels.
منابع مشابه
An Implementation of Modular Monadic Semantics using Folds and Monadic Folds*
Modular monadic semantics can be implemented using folds or catamorphisms over a functor that expresses the abstract syntax of the language. By composing several functors, it is possible to obtain modular interpreters from reusable components. Monadic folds structure programs that process recursively their input and control the side effects of the output they produce. We consider that the seman...
متن کاملModular Denotational Semantics for Compiler Construction ? Sheng
We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a language with a rich set of features from reusable building blocks, and use program transformation and equational reasoning to improve code. Compared to denotational semantics, reasoning in monadic style offers the added benefits of highly modularized proofs and m...
متن کاملModular Denotational Semantics for Compiler Construction
We show the benefits of applying modular monadic semantics to compiler construction. Modular monadic semantics allows us to define a languagewith a rich set of features from reusable building blocks, and use program transformation and equational reasoning to improve code. Compared to denotational semantics, reasoning in monadic style offers the added benefits of highly modularized proofs and mo...
متن کاملProof Abstraction for Imperative Languages
Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encapsulated with a monad. Such abstraction can be at odds with program verification, however, because...
متن کاملLifting of operations in modular monadic semantics
Monads have become a fundamental tool for structuring denotational semantics and programs by abstracting a wide variety of computational features such as side-effects, input/output, exceptions, continuations and non-determinism. In this setting, the notion of a monad is equipped with operations that allow programmers to manipulate these computational effects. For example, a monad for side-effec...
متن کامل